package com.rc.saas.tenant.mapper.acct;

import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.acct.AcctRule;
import com.rc.saas.tenant.model.acct.AcctRuleExample;
import com.rc.saas.tenant.search.acct.AcctRuleSearch;
import com.rc.saas.tenant.vo.acct.AcctRuleResultVo;
import com.rc.saas.tenant.vo.acct.AcctRuleVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface AcctRuleMapper extends BaseMapper<Long, AcctRule, AcctRuleExample> {

    List<AcctRuleResultVo> listPageAcctRule(AcctRuleSearch acctRuleSearch);

    void insertReturnId(AcctRule acctRule);

    AcctRuleResultVo selectAcctRule(Long acctRuleId);

    List<AcctRuleResultVo> isExecuteAcctRule(AcctRuleSearch acctRuleSearch);

    List<AcctRuleResultVo> isProcessingAcctRule(@Param("acctRuleId") Long acctRuleId, @Param("operatorStationId") Long operatorStationId, @Param("ruleStartTime") String ruleStartTime, @Param("ruleEndTime") String ruleEndTime);

    int countByAcctRuleStation(@Param("tenantCode") String tenantCode);

    List<AcctRuleVo> listAcctRuleByTime(String nowDate);
}